import { configureStore } from '@reduxjs/toolkit'
// 自动导出store
const modulesFiles = import.meta.glob('./modules/**.ts', { eager: true })
let store: any = {}
for (const key of Object.keys(modulesFiles)) {
  if (modulesFiles[key].default !== undefined) {
    store[key.split('/')[2].split('.')[0]] = modulesFiles[key].default
  }
}

export default configureStore({
  reducer: store,
})
